package com.shinewind.common.config.fastdfs;

import com.github.tobato.fastdfs.FdfsClientConfig;
import com.shinewind.common.util.FastDFSClientUtil;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;

@Configuration
@ConditionalOnProperty(value = "fdfs.enable",havingValue = "true")
@Import(FdfsClientConfig.class)
public class FdfsConfiguration {
    @Bean
    public FastDFSClientUtil getFastDFSClientUtil(){
        System.out.println("FastDFSClientUtil的Bean装载了");
        return new FastDFSClientUtil();
    }
}
